Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Sirius Web Diagrams Support
Sirius Web Diagrams Support [message #1819339] Mon, 13 January 2020 13:37 Go to next message
Björn Beyreuther is currently offline Björn BeyreutherFriend
Messages: 7
Registered: March 2012
Junior Member
Hello,

we are interested in the Sirius Web Support for Diagrams. Based on my research there are the following projects/artifacts:

Sirius Server (6.3.0)

  • Eclipse based RCP
  • Provides basic functionality for Project (IProject) , Viewpoints(.odesign) and Metamodels Management
  • Sirius Diagram support ...


Workflow API (experimental)

  • Support to define Actions in the (.odesign) file which can be interpreted by the Sirius Server


Sirius Server Diagram Sprotty (6.3.0) (org.eclipse.sirius.server.diagram.sprotty)

  • Provides a WebSocket which can be used as ModelSource for Sprotty
  • Transformers Sirius Diagrams (DDiagram) to Sprotty Diagrams (SGraph)
  • Can be used to show Sirius Diagrams included in a Project on the Sirius Server?



We have deployed a Sirius Server with a viewpoint definition basicfamily.odesign from "org.eclipse.sirius.sample.basicfamily.design" for testing.


osgi> !SESSION 2020-01-13 12:08:46.660 -----------------------------------------------
eclipse.buildId=unknown
java.fullversion=1.8.0_212-b04
JRE 1.8.0 Windows 8 amd64-64-Bit Compressed References 20190521_368 (JIT enabled, AOT enabled)
OpenJ9   - 4b1df46fe
OMR      - b56045d2
JCL      - a8c217d402 based on jdk8u212-b04
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=de_DE
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -console -consoleLog

!ENTRY org.eclipse.sirius.ext.ide 1 0 2020-01-13 12:08:48.996
!MESSAGE The attribute label is missing from the configuration element org.eclipse.sirius.server.diagram.sprotty.

!ENTRY org.eclipse.sirius.ext.ide 1 0 2020-01-13 12:08:48.999
!MESSAGE The attribute description is missing from the configuration element org.eclipse.sirius.server.diagram.sprotty.
2020-01-13 12:08:49.140:INFO::app thread - org.eclipse.sirius.server.application.SiriusServerApplication.0: Logging initialized @2643ms to org.eclipse.jetty.util.log.StdErrLog
2020-01-13 12:08:49.331:INFO:oejs.Server:app thread - org.eclipse.sirius.server.application.SiriusServerApplication.0: jetty-9.4.10.v20180503; built: 2018-05-03T15:56:21.710Z; git: daa59876e6f384329b122929e70a80934569428c; jvm 1.8.0_212-b04
2020-01-13 12:08:49.344:INFO:oejs.session:app thread - org.eclipse.sirius.server.application.SiriusServerApplication.0: DefaultSessionIdManager workerName=node0
2020-01-13 12:08:49.345:INFO:oejs.session:app thread - org.eclipse.sirius.server.application.SiriusServerApplication.0: No SessionScavenger set, using defaults
2020-01-13 12:08:49.346:INFO:oejs.session:app thread - org.eclipse.sirius.server.application.SiriusServerApplication.0: node0 Scavenging every 660000ms
2020-01-13 12:08:49.350:INFO:oejsh.ContextHandler:app thread - org.eclipse.sirius.server.application.SiriusServerApplication.0: Started o.e.j.s.ServletContextHandler@2e49df09{/api,null,AVAILABLE}
2020-01-13 12:08:49.356:INFO:oejsh.ContextHandler:app thread - org.eclipse.sirius.server.application.SiriusServerApplication.0: Started o.e.j.s.ServletContextHandler@3a723c65{/ws,null,AVAILABLE}
2020-01-13 12:08:49.368:INFO:oejsh.ContextHandler:app thread - org.eclipse.sirius.server.application.SiriusServerApplication.0: Started o.e.j.s.ServletContextHandler@7c82e977{/workflow,null,AVAILABLE}
2020-01-13 12:08:49.370:INFO:oejsh.ContextHandler:app thread - org.eclipse.sirius.server.application.SiriusServerApplication.0: Started o.e.j.s.ServletContextHandler@-3b4adc9e{/images,null,AVAILABLE}
2020-01-13 12:08:49.375:INFO:oejsh.ContextHandler:app thread - org.eclipse.sirius.server.application.SiriusServerApplication.0: Started o.e.j.s.ServletContextHandler@-4f01dcb9{/,null,AVAILABLE}
2020-01-13 12:08:49.380:INFO:oejsh.ContextHandler:app thread - org.eclipse.sirius.server.application.SiriusServerApplication.0: Started o.e.j.s.ServletContextHandler@5147c287{/diagrams,null,AVAILABLE}
2020-01-13 12:08:49.398:INFO:oejs.AbstractConnector:app thread - org.eclipse.sirius.server.application.SiriusServerApplication.0: Started ServerConnector@2534f641{HTTP/1.1,[http/1.1]}{0.0.0.0:8080}
2020-01-13 12:08:49.400:INFO:oejs.Server:app thread - org.eclipse.sirius.server.application.SiriusServerApplication.0: Started @2903ms

!ENTRY org.eclipse.sirius 2 0 2020-01-13 12:09:09.119
!MESSAGE No default analysis selector provider found at extension point "org.eclipse.sirius.analysisSelectorProvider", using the DefaultAnalysisSelectorProvider instead.


We created a Project (called Test) and included an example model (example.basicfamily) as well as a representation file (representations.aird). The ".arid" file also includes a Diagram called "PersonsDiagram"

The Sprotty diagram project (org.eclipse.sirius.server.diagram.sprotty) was also deployed with the Sirius Server and my expectation was that I am able to view the Diagram via:
http://localhost:8080/diagrams/index.html?project=Test&aird=representations.aird&representationName=PersonsDiagram

But this is not working for me but maybe i misunderstood how this project should be used and what its propose is? This leads to my first Question ...

Question 1: Is there any documentation how to use the "org.eclipse.sirius.server.diagram.sprotty" project to visualize Diagrams? Or is it not the intention of that Project?

----

We also started the investigation from the Sprotty side but we noticed that in addition to the Model which will be retrieved via web socket also bindings and view definitions will be required. A quick look at
org.eclipse.sirius.server.diagram.sprotty\webapp\bundle.js
showed that also a dedicated SiriusWebSocketDiagramServer is used as ModelSource. This leads to the second Question ...

Question 2: Is the JavaScript/Dependency Injection definition bundled in "org.eclipse.sirius.server.diagram.sprotty" public available and could be used/extended to develop a Web Application which includes Sirius Diagrams. I think interesting parts are SiriusWebSocketDiagramServer, the Views (i.e. SiriusSquareNodeView) and the Dependency Injection which is also related to the Backend i think (
viewRegistry.register('node:square', SiriusSquareNodeView); 
used in the binding correlates to the Type in SiriusSquareNode.java ?) .

Best regards,
Björn Beyreuther
Re: Sirius Web Diagrams Support [message #1819387 is a reply to message #1819339] Tue, 14 January 2020 10:14 Go to previous messageGo to next message
Pierre-Charles David is currently offline Pierre-Charles DavidFriend
Messages: 703
Registered: July 2009
Senior Member
Hi,

Thanks for your interest.

First, the "Workflow API" is only useful if you actually plan to define Worklow elements in your odesign file. It *uses* the server to work, but it not needed at all for the server to work. You can probably ignore it completely.

Deploying the server can actually be quite involved. It don't know exactly what steps you made, but there are two README files that you can/should read:
* https://github.com/pcdavid/org.eclipse.sirius/tree/master/plugins/org.eclipse.sirius.server for the general description of the server and how to deploy it;
* https://github.com/pcdavid/org.eclipse.sirius/tree/master/plugins/org.eclipse.sirius.server.diagram.sprotty to setup the Sprotty plug-in. For packaging reasons, the Sirius Sprotty plug-in as ditributed in the source is not complete and some manual steps are needed to make it functional.

It's difficult to give more information as I don't know what steps you followed when you mention "we have deployed a Sirius Server".

Note that these plug-ins, while they can be useful, are experimental and not supported. They correspond to a first approach to move Sirius to the web, but this particular approach is discontinued. We at Obeo are working on a new version of "Sirius on the Web". You can have have a look at the presentation we made at the last EclipseCon (https://www.youtube.com/watch?v=7LQ7MKXKH-I) to see how it works, and contact melanie.bats@obeo.fr if you are interested.

Regards,
Pierre-Charles David


Pierre-Charles David - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Sirius Web Diagrams Support [message #1819390 is a reply to message #1819387] Tue, 14 January 2020 11:53 Go to previous messageGo to next message
Björn Beyreuther is currently offline Björn BeyreutherFriend
Messages: 7
Registered: March 2012
Junior Member
Hi,

i was thinking about the workflow API in the same way and more or less ignored it for now.

With "we have deployed a Sirius Server" i meant that we have a Sirius Server running based on your first tutorial in addition to the Sprotty plug-in which was added based on the second tutorial.

So, the Sirius Server is up and Running on our side and i can create Projects via the default web interface. I also see the Viewpoints which are available on the server. In the example case we just added the simple family example for testing.

ss org.eclipse.sirius.server
"Framework is launched."
id      State       Bundle
192     ACTIVE      org.eclipse.sirius.server_6.3.0.202001131706
193     ACTIVE      org.eclipse.sirius.server.application_6.3.0.202001131706
194     ACTIVE      org.eclipse.sirius.server.backend_6.3.0.202001131706
195     ACTIVE      org.eclipse.sirius.server.diagram_6.3.0.202001131706
196     ACTIVE      org.eclipse.sirius.server.diagram.sprotty_6.3.0.202001131706
197     ACTIVE      org.eclipse.sirius.server.frontend_6.3.0.202001131706
198     ACTIVE      org.eclipse.sirius.server.frontend.workflow_6.3.0.202001131706
199     ACTIVE      org.eclipse.sirius.server.graphql_6.3.0.202001131706
200     ACTIVE      org.eclipse.sirius.server.images_6.3.0.202001131706
osgi>

osgi> ss org.eclipse.sirius.sample.basicfamily
"Framework is launched."
id      State       Bundle
188     ACTIVE     org.eclipse.sirius.sample.basicfamily_1.0.0.202001131706
189     ACTIVE      org.eclipse.sirius.sample.basicfamily.advanced.design_1.0.0.202001131706
190     STARTING    org.eclipse.sirius.sample.basicfamily.edit_1.0.0.202001131706
191     STARTING    org.eclipse.sirius.sample.basicfamily.editor_1.0.0.202001131706
osgi>


Also, the Sprotty plugin exposes its ServletContext on "diagrams"
2020-01-13 12:08:49.380:INFO:oejsh.ContextHandler:app thread - org.eclipse.sirius.server.application.SiriusServerApplication.0: Started o.e.j.s.ServletContextHandler@5147c287{/diagrams,null,AVAILABLE}


The question is how to proceed. For example, how to display a Diagram defined in a representation file located in a Project maintained by the Server by using the Sprotty plugin. I was expecting that i can use the "localhost:8080/diagrams" path exposed by the sprotty plugin to render a diagram (location defined by http query parameters). For example:
http://localhost:8080/diagrams/index.html?project=Test&aird=representations.aird&representationName=PersonsDiagram


But this is not working and basically i found no documentation about the Sprotty plugin except the one describing how to add it to the Sirius server build (you have mentioned). I only observed in the different videos/slides and pictures that in all Sirius Web examples it was possible to display diagrams in the browser, so I assumed this project was used to do this but maybe I am completely wrong here (i.e. https://blog.obeo.fr/modeling-tools-go-up-to-the-cloud.

I already noticed the Sirius Cloud Platform https://blog.obeo.fr/obeo-cloud-platform and I am also interested in it but it is not available at the moment so i focus on the components i have to evaluate if it is feasible to use the technologies. Nevertheless, i assumed that the Cloud Platform Backend was still using the Sirius Server as well as Sprotty for the visualization. Or does "They correspond to a first approach to move Sirius to the web, but this particular approach is discontinued." mean that also the Sirius Server is discontinued?

Best regards,
Björn Beyreuther
Re: Sirius Web Diagrams Support [message #1819397 is a reply to message #1819390] Tue, 14 January 2020 14:52 Go to previous messageGo to next message
Pierre-Charles David is currently offline Pierre-Charles DavidFriend
Messages: 703
Registered: July 2009
Senior Member
Björn Beyreuther wrote on Tue, 14 January 2020 12:53

But this is not working and basically i found no documentation about the Sprotty plugin except the one describing how to add it to the Sirius server build (you have mentioned). I only observed in the different videos/slides and pictures that in all Sirius Web examples it was possible to display diagrams in the browser, so I assumed this project was used to do this but maybe I am completely wrong here (i.e. https://blog.obeo.fr/modeling-tools-go-up-to-the-cloud.


The version visible on this message and the accompanying videos was indeed based on that version of the code, but it has since been abandonned (hence the fact that the plug-ins are not maintained).

Björn Beyreuther wrote on Tue, 14 January 2020 12:53

I already noticed the Sirius Cloud Platform https://blog.obeo.fr/obeo-cloud-platform and I am also interested in it but it is not available at the moment so i focus on the components i have to evaluate if it is feasible to use the technologies. Nevertheless, i assumed that the Cloud Platform Backend was still using the Sirius Server as well as Sprotty for the visualization. Or does "They correspond to a first approach to move Sirius to the web, but this particular approach is discontinued." mean that also the Sirius Server is discontinued?


The Obeo Cloud Platform shares some ideas from what we learned with the Sirius Server expriment available in the repo, notably the use of GraphQL for the client/server interface and the use of Sprotty for the diagram rendering, but is otherwise a different codebase. Our CTO (melanie.bats@obeo.fr) is the person to contact to know more and get involved in the beta testing program.

Regards,
Pierre-Charles


Pierre-Charles David - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Sirius Web Diagrams Support [message #1819431 is a reply to message #1819397] Wed, 15 January 2020 10:40 Go to previous message
Björn Beyreuther is currently offline Björn BeyreutherFriend
Messages: 7
Registered: March 2012
Junior Member
Thanks for the insights so far. I will contact Melanie Bats for further details.

Best regards,
Björn Beyreuther

[Updated on: Wed, 15 January 2020 10:41]

Report message to a moderator

Previous Topic:NullPointerException when trying to open properties view
Next Topic:The 'table creation tool' is not stable
Goto Forum:
  


Current Time: Tue Apr 23 13:59:33 GMT 2024

Powered by FUDForum. Page generated in 0.03038 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top