Freeplane Server

classic Classic list List threaded Threaded
34 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Freeplane Server

joetopshot
Per our discussion last week about the Freeplane server, we decided on using spring-boot as a starting point (at least for now).  Felix, I believe you said you would start us off by putting together a simple spring-boot framework.  Do you still plan to do that?

I'm off of work this Tuesday (USA Independence Day holiday and as I work for a USA company I cannot charge them any time this Tuesday).  Will you have something ready by then?  Or should I put together a beginning framework?  I should have some time available.

Thanks,
Joe
--
Joe Berry
Reply | Threaded
Open this post in threaded view
|

Re: Freeplane Server

Felix Natter
hi Joe,

I have just put together a basic spring-boot project with a REST controller and its UT.
Here are the instructions for eclipse (note that you can also do the cloning in eclipse):

- change to a directory where your (freeplane) repositories live
- git clone https://github.com/freeplane/freeplane-server.git
- cd freeplane-server
- gradle build cleanEclipse eclipse
- create a fresh eclipse workspace
- File->Import...->General->Existing Projects into Workspace->rootDir=your local git checkout->Select freeplane-server->Finish
- Select project, Team->Share project->Git->Use or create repository in parent folder of project

You can get gradle from https://gradle.org/.

Looks like we have a meeting on Sunday, the 9th of July. What can we do until then already?

Cheers and Best Regards,
Felix

Reply | Threaded
Open this post in threaded view
|

Re: Freeplane Server

joetopshot
Very nice, Felix.  You're faster than I thought.  I won't be able to look at what you have done until Sunday at the earliest.  Here's one suggestion.  I assume you probably put a REST GET controller in place (that's obviously the easiest thing to do).  I would suggest also adding a REST POST controller as we will undoubtedly need that too.

One question as I'm no git expert.  Git has no problem dealing with its directories knowing that there's another git inside (or underneath)?

Best Regards,
Joe
--
Joe Berry
Reply | Threaded
Open this post in threaded view
|

Re: Freeplane Server

Felix Natter
hello Joe,

indeed the current REST controller was just a minimal example from a spring-boot tutorial.
I am in the process of reading about REST support in Spring.

Regarding the git issue: Do you mean creating a git repository in a git repository?
This is done very rarely (if possible at all), and we certainly don't do it.
Where do you see it, is it related to my "change to a directory where your (freeplane) repositories live" statement?
I meant "change to any directory, usually the parent directory of your freeplane checkout" ;-)

@Dimitry: Could you please make Joe and Volker contributors in freeplane-server?

Cheers and Best Regards,
Felix
Reply | Threaded
Open this post in threaded view
|

Re: Freeplane Server

joetopshot
Hi.

Yes, your text implied (to me at least) that you should create the server git repository inside the regular freeplane repository.  Thanks for that clarification.

If I can help or clarify anything with respect to the REST stuff, let me know.  I've done a fair amount of Spring/REST work including incorporating AOP and other useful features.  

Best Regards,
Joe
--
Joe Berry
Reply | Threaded
Open this post in threaded view
|

Re: Freeplane Server

Dimitry Polivaev
Administrator
Hello,

I have changed my plans for this weekend and we could have a hangout this Sunday.
I have extended doodle http://doodle.com/poll/b93xhauvgkbpzqkx .

Volker, Felix, Joe, please vote.
If somebody else on the list is interested you can join us.

Regards,
Dimitry


Reply | Threaded
Open this post in threaded view
|

Re: Freeplane Server

Dimitry Polivaev
Administrator
In reply to this post by joetopshot
Joe wrote me he could make it on Saturday night too.
I have changed the times in the doodle accordingly.

Regards,
Dimitry


Reply | Threaded
Open this post in threaded view
|

Re: Freeplane Server

joetopshot
In reply to this post by Felix Natter
Hi Felix,

I'm following your directions.  Checkout and import of the project went fine.  However, when I tried to follow this step:  - Select project, Team->Share project->Git->Use or create repository in parent folder of project
I did not see a "Share project" under Team.  I even looked inside of all the options within Team.  Not sure how important this step is as I'm fairly new to git (and even more so using git within eclipse).  I'm using eclipse Neon and git plugin egit.

--
Joe Berry
Reply | Threaded
Open this post in threaded view
|

Re: Freeplane Server

joetopshot
I just checked in a number of changes to the server code:
I added a few more endpoints as a starting point to give us something to work with:
  * /map (get)
  * /map (post)
  * /map/<id> (get)
  * /map/<id> (post)

I added logging capability.  By default we now log to the console.  If you want to additionally log to a file, modify file application.properties (the line to change should be obvious, I hope).

I enabled Spring Boot actuators so the following endpoints should work:
/admin/health
/admin/mappings
/admin/env
/admin/info

I want to enhance the health endpoint a bit by adding the physical build information of the running code but I'm going to need some gradle help for that.  This will be useful for when we deploy to a remote server and there's some question about whether the executing code has really been updated or not (I've stumbled over this issue more than once in the past).

I enabled swagger which is really useful for debugging, especially HTML POST transactions.  Unfortunately, I couldn't get the swagger UI to work.  There appears to be a mismatch problem between Spring Boot's logging and the swagger UI logging.  I know we have solved this problem in the past.  I simply need to do some more homework.  (Note that we can always use the Chrome browser Postman extension if needed.)
--
Joe Berry
Reply | Threaded
Open this post in threaded view
|

Re: Freeplane Server

Felix Natter
In reply to this post by joetopshot
hello Joe,

Team->Share project is only necessary if eclipse hasn't yet associated the freeplane-server project
with your local repo. If you see [freeplane-server master] next to the project, then you already have that
(not sure when exactly it is configured).

Cheers and Best Regards,
Felix
Reply | Threaded
Open this post in threaded view
|

Re: Freeplane Server

Felix Natter
In reply to this post by joetopshot
> I want to enhance the health endpoint a bit by adding the physical build information of the running code but I'm going to need
> some gradle help for that.

I could write a gradle task that generates a properties file with project.version, build date and ...?

> This will be useful for when we deploy to a remote server and there's some question about whether
> the executing code has really been updated or not (I've stumbled over this issue more than once in the past).

Sounds very useful :-)

Cheers and Best Regards,
Felix
Reply | Threaded
Open this post in threaded view
|

Re: Freeplane Server

Felix Natter
In reply to this post by joetopshot
hi Joe,

one more thing: Please remove .project from version control: This is autogenerated by "gradle cleanEclipse eclipse".

Cheers and Best Regards,
Felix
Reply | Threaded
Open this post in threaded view
|

Re: Freeplane Server

joetopshot
In reply to this post by Felix Natter
Hi Felix,

(1) Thanks for the info on .project. That was the one file I wasn't 100% certain of.  I've already removed .project and updated the .gitignore file.

(2) Regarding the enhanced health endpoint, I'm not sure what you mean by a properties file.  With maven, there's a <build> tag (or some other tag -- can't recall offhand) that will automatically take the current build info and incorporate it into the build for the health actuator to pick up.  Maybe it also creates a properties file; I've never looked to see how it physically works.  Are you familiar with the feature and that is why you are mentioning a properties file?  If not, we'll need to understand exactly how Spring Boot is picking up that information.  If yes, that sounds great.  Not a particularly urgent item but it is really a nice to have item and I'd love to learn how you would do that.

In the past we had some difficulties deploying to Pivotal Cloud Foundry and getting up to date feedback on what actually got deployed.  This was quite helpful.  
--
Joe Berry
Reply | Threaded
Open this post in threaded view
|

Re: Freeplane Server

joetopshot
So per our discussion last week where we decided we would investigate websockets, I took a look at the demo at https://spring.io/guides/gs/messaging-stomp-websocket.  It was very easy to get it to work.  It does seem like a possible technology for us to use.  The next step I assume is to take our barebones framework code which currently uses REST and convert it to use websockets.  Should be easy enough.

Felix will you have time this week to look at that?  I won't have any time until probably this Sunday.  If by then you have not started on the conversion I will attempt to do so.
--
Joe Berry
Reply | Threaded
Open this post in threaded view
|

Re: Freeplane Server

Felix Natter
hello Joe,

"joetopshot [via Freeplane Developer]"
<[hidden email]> writes:

> So per our discussion last week where we decided we would investigate
> websockets, I took a look at the demo at
> https://spring.io/guides/gs/messaging-stomp-websocket.  It was very easy to
> get it to work.  It does seem like a possible technology for us to use.
> The next step I assume is to take our barebones framework code which
> currently uses REST and convert it to use websockets.  Should be easy
> enough.
>
> Felix will you have time this week to look at that?  I won't have any time
> until probably this Sunday.  If by then you have not started on the
> conversion I will attempt to do so.

I will have time on Saturday. I will look at the tutorial, though I
might not achieve conversion all the REST interfaces to web sockets.

Do you want to have a look at the remaining work on Sunday afternoon
together? Of course, go ahead if you want to start before that :-)

Cheers and Best Regards,
--
Felix Natter
Reply | Threaded
Open this post in threaded view
|

Re: Freeplane Server

joetopshot
Hello Felix,

Felix Natter wrote
I will have time on Saturday. I will look at the tutorial, though I
might not achieve conversion all the REST interfaces to web sockets.

Do you want to have a look at the remaining work on Sunday afternoon
together? Of course, go ahead if you want to start before that :-)
Sunday afternoon together sounds good actually.  I'm going to work 3-4 hours Sunday morning. I just checked the temperature for Sunday.  36 deg C.  A good day to stay in an air conditioned room. So unless something comes up (translation: my wife needs me for something), let's try to modify our code together.  Let's connect Sunday morning sometime to determine the actual hour. I believe I'm one hour ahead of you.

Talk to you soon,
Joe
--
Joe Berry
Reply | Threaded
Open this post in threaded view
|

Re: Freeplane Server

Felix Natter
"joetopshot [via Freeplane Developer]"
<[hidden email]> writes:

> Hello Felix,

hi Joe,

>     Felix Natter wrote
>     I will have time on Saturday. I will look at the tutorial, though I
>     might not achieve conversion all the REST interfaces to web sockets.
>    
>     Do you want to have a look at the remaining work on Sunday afternoon
>     together? Of course, go ahead if you want to start before that :-)
>
> Sunday afternoon together sounds good actually.  I'm going to work 3-4 hours Sunday morning. I just checked the temperature for Sunday.  36 deg C.  A good day to
> stay in an air conditioned room. So unless something comes up (translation: my wife needs me for something), let's try to modify our code together.  Let's
> connect Sunday morning sometime to determine the actual hour. I believe I'm one hour ahead of you.

Please suggest a time, I will be offline for sports and lunch from 8:30
to 13:00-14:00 German time. Shall we use skype or hangout?

Cheers and Best Regards,
--
Felix Natter
Reply | Threaded
Open this post in threaded view
|

Re: Freeplane Server

joetopshot
Hi Felix,

Unfortunately I have a rather serious problem.  I have no internet connectivity from my ISP.  I'm currently using my smartphone access point to connect.  A technician is coming (I think my modem is broken) on Tuesday.  I need to save the gigabytes on my phone account for work for tomorrow so I need to cancel today. Maybe we can work together during the week (Wed?).

Sorry,
Joe
--
Joe Berry
Reply | Threaded
Open this post in threaded view
|

Re: Freeplane Server

joetopshot
Quick update.  My entire village is without Internet access. So this is a problem that should get fixed today.  I'll let you know if/when I get connectivity again.  Maybe we can still work together later today.  As for Hangups vs Skype, I really don't care. Not sure which has better response.
--
Joe Berry
Reply | Threaded
Open this post in threaded view
|

Re: Freeplane Server

Felix Natter
In reply to this post by joetopshot
hello Joe,

no problem! I will study web sockets, and if I find a good article / code I will post it here :-)

On Wednesday, I have an appointment in the fitness club, and I also attend the fitness club on Monday and Friday.
On these days, I am online starting from 21:00 German time, so we can chat / coordinate for about an hour.
We can also meet Tuesday or Thursday, when I should have some more time.

Cheers and Best Regards,
Felix
12