SlideShare una empresa de Scribd logo
1 de 20
Descargar para leer sin conexión
W E B V E V E R I E T




JavaScript Topic Maps in
  server environments


    Jan Schreiber <jans@ravn.no>

                              Ravn Webveveriet AS, 2010-10-01
                                                                1
Outline
                        • JavaScript
                        • The tmjs Topic Maps engine
                        • Use Case: A PSI Server
                        • Outlook


W E B V E V E R I E T


                                                       2
JavaScript
                        • JavaScript is LISP with a C-like syntax
                        • Virtually every personal computer in
                          the world has at least one JavaScript
                          interpreter installed on it and in active
                          use.




W E B V E V E R I E T


                                                                      3
tmjs
                        • A Topic Maps engine
                        • Written in pure JavaScript
                        • Full TMDM including Variants
                        • TMAPI 2.0-based
                        • In-memory backend, JTM import/
                          export, experimental XTM 2.0 import
                          (requires DOM)

W E B V E V E R I E T


                                                                4
tmjs
                        • Platform independent: All(iPhone &
                          browsers, mobile devices
                                                    modern

                          Android), server-side JavaScript
                        • Unit tests, CXTM tests (partly) & JSLint
                          validating
                        • Small changes to TMAPI due to the lack of
                          method overloading
                        • Syntactic sugar: Supports chaining of
                          TMAPI calls

W E B V E V E R I E T


                                                                      5
Chaining

                        1 tm.createTopic().addSubjectIdentifier(foo).
                        2   createName('bar').getParent().
                        3   createOccurrence(type,'baz').
                        4     addScopingTopic(quux);




W E B V E V E R I E T


                                                                        6
tmjs: Outlook
                        •   More import/export formats: XTM 2.0, CTM
                        •   Complete TMAPI, add more tests, full CXTM
                        •   Persistence:
                            •   Web SQL Database backend
                            •   Persistent backend for Node (couchdb?)
                        •   Later: Query language



W E B V E V E R I E T


                                                                         7
Use Case: A PSI Server


                        • Idea: Start the server with a Topic Map
                          and it will serve information about all
                          Subject Identifiers for a given domain




W E B V E V E R I E T


                                                                    8
• Screenshot node-psi-server


W E B V E V E R I E T


                                                       9
Server-side JavaScript


                        • 1996: Netscape releases LiveWire as
                          part of Netscape Enterprise Server 2.0
                        • 2009: Ryan Dahl writes Node

W E B V E V E R I E T


                                                                   10
Node
                        • A framework for low-level network
                          applications based on Google's V8
                          engine
                        • TCP, DNS and HTTP are first-class
                          protocols
                        • Event-based, asynchronous
                          programming
                        • All I/O is non-blocking
W E B V E V E R I E T


                                                              11
result = db_query(db, "SELECT * FROM topic");




W E B V E V E R I E T


                                                       12
db_query(db, "SELECT * FROM topic", callback);




W E B V E V E R I E T


                                                        13
db_query(db, "SELECT * FROM topic", callback);
       callback = function (err, result) {
                  // ...
       }


W E B V E V E R I E T


                                                        14
1              var tm, servername;
 2              // assumes that the TopicMap object tm has been initialized and
 3              // the topic map in question has been imported successfuly.
 4              // servername is set from a command line parameter
 5              http.createServer(function (req, res) {
 6                      var url = 'http://'+servername+req.url, loc, topic;
 7                      loc = tm.createLocator(url);
 8                      topic = tm.getTopicBySubjectIdentifier(loc);
 9                      if (topic) {
 10                         res.writeHead(200, {'Content-Type': 'text/html'});
 11                         // create a page with information about the PSI
 12                     } else {
 13                         // Not found: create a 404 response
 14                     }
 15                     res.close();
 16             }).listen(80);


W E B V E V E R I E T


                                                                                 15
Use Case: A PSI Server
               • More output formats: XHTML, JTM, XTM
               • Support for logging, caching, templates
               • Configurable list of information elements
                        that are included on generated pages (e.g.
                        dc:description, supertype-subtype)
               • PSI black-listing
               • subj3ct.com integration
W E B V E V E R I E T


                                                                     16
PSI Server: Observations

                        • Easy to implement
                        • It’s really fast: 200+200ms to read the
                          Opera topic map, 1ms to serve a PSI
                          page
                        • tmjs can be used on server and client
                          side    Reuse of application code


W E B V E V E R I E T


                                                                    17
Summary & Outlook

                        • Server side Topic Maps with JavaScript:
                          possible!
                        • Asynchronous TMAPI?
                        • In its current state maybe best suited
                          for low-level applications


W E B V E V E R I E T


                                                                    18
What could it be good for?


                        • TMRAP, TM REST API
                        • SDshare
                        • P2P applications
                        • DNS servers

W E B V E V E R I E T


                                                     19
Questions?

                        Download tmjs now!
                        http://github.com/jansc/tmjs
                        Coming soon:
                        http://github.com/jansc/node-psi-server



W E B V E V E R I E T


                                                                  20

Más contenido relacionado

La actualidad más candente

FreeBSD and Drivers
FreeBSD and DriversFreeBSD and Drivers
FreeBSD and DriversKernel TLV
 
More on bpftrace for MariaDB DBAs and Developers - FOSDEM 2022 MariaDB Devroom
More on bpftrace for MariaDB DBAs and Developers - FOSDEM 2022 MariaDB DevroomMore on bpftrace for MariaDB DBAs and Developers - FOSDEM 2022 MariaDB Devroom
More on bpftrace for MariaDB DBAs and Developers - FOSDEM 2022 MariaDB DevroomValeriy Kravchuk
 
Distributed app development with nodejs and zeromq
Distributed app development with nodejs and zeromqDistributed app development with nodejs and zeromq
Distributed app development with nodejs and zeromqRuben Tan
 
Development and deployment with composer and kite
Development and deployment with composer and kiteDevelopment and deployment with composer and kite
Development and deployment with composer and kiteChristian Opitz
 
LLJVM: LLVM bitcode to JVM bytecode
LLJVM: LLVM bitcode to JVM bytecodeLLJVM: LLVM bitcode to JVM bytecode
LLJVM: LLVM bitcode to JVM bytecodeTakeshi Yamamuro
 
Improving the ZFS Userland-Kernel API with Channel Programs - BSDCAN 2017 - M...
Improving the ZFS Userland-Kernel API with Channel Programs - BSDCAN 2017 - M...Improving the ZFS Userland-Kernel API with Channel Programs - BSDCAN 2017 - M...
Improving the ZFS Userland-Kernel API with Channel Programs - BSDCAN 2017 - M...Matthew Ahrens
 
Monitoraggio del Traffico di Rete Usando Python ed ntop
Monitoraggio del Traffico di Rete Usando Python ed ntopMonitoraggio del Traffico di Rete Usando Python ed ntop
Monitoraggio del Traffico di Rete Usando Python ed ntopPyCon Italia
 
IPv4aaS tutorial and hands-on
IPv4aaS tutorial and hands-onIPv4aaS tutorial and hands-on
IPv4aaS tutorial and hands-onAPNIC
 
NativeBoost
NativeBoostNativeBoost
NativeBoostESUG
 
OpenMP Tutorial for Beginners
OpenMP Tutorial for BeginnersOpenMP Tutorial for Beginners
OpenMP Tutorial for BeginnersDhanashree Prasad
 
High-Performance Networking Using eBPF, XDP, and io_uring
High-Performance Networking Using eBPF, XDP, and io_uringHigh-Performance Networking Using eBPF, XDP, and io_uring
High-Performance Networking Using eBPF, XDP, and io_uringScyllaDB
 
A Sneak Peek of MLIR in TensorFlow
A Sneak Peek of MLIR in TensorFlowA Sneak Peek of MLIR in TensorFlow
A Sneak Peek of MLIR in TensorFlowKoan-Sin Tan
 
Concurrent Programming OpenMP @ Distributed System Discussion
Concurrent Programming OpenMP @ Distributed System DiscussionConcurrent Programming OpenMP @ Distributed System Discussion
Concurrent Programming OpenMP @ Distributed System DiscussionCherryBerry2
 
OSDC 2017 - Casey Callendrello -The evolution of the Container Network Interface
OSDC 2017 - Casey Callendrello -The evolution of the Container Network InterfaceOSDC 2017 - Casey Callendrello -The evolution of the Container Network Interface
OSDC 2017 - Casey Callendrello -The evolution of the Container Network InterfaceNETWAYS
 

La actualidad más candente (17)

FreeBSD and Drivers
FreeBSD and DriversFreeBSD and Drivers
FreeBSD and Drivers
 
More on bpftrace for MariaDB DBAs and Developers - FOSDEM 2022 MariaDB Devroom
More on bpftrace for MariaDB DBAs and Developers - FOSDEM 2022 MariaDB DevroomMore on bpftrace for MariaDB DBAs and Developers - FOSDEM 2022 MariaDB Devroom
More on bpftrace for MariaDB DBAs and Developers - FOSDEM 2022 MariaDB Devroom
 
Distributed app development with nodejs and zeromq
Distributed app development with nodejs and zeromqDistributed app development with nodejs and zeromq
Distributed app development with nodejs and zeromq
 
Development and deployment with composer and kite
Development and deployment with composer and kiteDevelopment and deployment with composer and kite
Development and deployment with composer and kite
 
Open mp intro_01
Open mp intro_01Open mp intro_01
Open mp intro_01
 
LLJVM: LLVM bitcode to JVM bytecode
LLJVM: LLVM bitcode to JVM bytecodeLLJVM: LLVM bitcode to JVM bytecode
LLJVM: LLVM bitcode to JVM bytecode
 
Improving the ZFS Userland-Kernel API with Channel Programs - BSDCAN 2017 - M...
Improving the ZFS Userland-Kernel API with Channel Programs - BSDCAN 2017 - M...Improving the ZFS Userland-Kernel API with Channel Programs - BSDCAN 2017 - M...
Improving the ZFS Userland-Kernel API with Channel Programs - BSDCAN 2017 - M...
 
Monitoraggio del Traffico di Rete Usando Python ed ntop
Monitoraggio del Traffico di Rete Usando Python ed ntopMonitoraggio del Traffico di Rete Usando Python ed ntop
Monitoraggio del Traffico di Rete Usando Python ed ntop
 
IPv4aaS tutorial and hands-on
IPv4aaS tutorial and hands-onIPv4aaS tutorial and hands-on
IPv4aaS tutorial and hands-on
 
MPI n OpenMP
MPI n OpenMPMPI n OpenMP
MPI n OpenMP
 
NativeBoost
NativeBoostNativeBoost
NativeBoost
 
OpenMP Tutorial for Beginners
OpenMP Tutorial for BeginnersOpenMP Tutorial for Beginners
OpenMP Tutorial for Beginners
 
High-Performance Networking Using eBPF, XDP, and io_uring
High-Performance Networking Using eBPF, XDP, and io_uringHigh-Performance Networking Using eBPF, XDP, and io_uring
High-Performance Networking Using eBPF, XDP, and io_uring
 
A Sneak Peek of MLIR in TensorFlow
A Sneak Peek of MLIR in TensorFlowA Sneak Peek of MLIR in TensorFlow
A Sneak Peek of MLIR in TensorFlow
 
Concurrent Programming OpenMP @ Distributed System Discussion
Concurrent Programming OpenMP @ Distributed System DiscussionConcurrent Programming OpenMP @ Distributed System Discussion
Concurrent Programming OpenMP @ Distributed System Discussion
 
S emb t13-freertos
S emb t13-freertosS emb t13-freertos
S emb t13-freertos
 
OSDC 2017 - Casey Callendrello -The evolution of the Container Network Interface
OSDC 2017 - Casey Callendrello -The evolution of the Container Network InterfaceOSDC 2017 - Casey Callendrello -The evolution of the Container Network Interface
OSDC 2017 - Casey Callendrello -The evolution of the Container Network Interface
 

Similar a JavaScript Topic Maps in server environments

Using Smalltalk for controlling robotics systems
Using Smalltalk for controlling robotics systemsUsing Smalltalk for controlling robotics systems
Using Smalltalk for controlling robotics systemsSerge Stinckwich
 
introduction to node.js
introduction to node.jsintroduction to node.js
introduction to node.jsorkaplan
 
Deploying WO on Windows
Deploying WO on WindowsDeploying WO on Windows
Deploying WO on WindowsWO Community
 
Nodejs a-practical-introduction-oredev
Nodejs a-practical-introduction-oredevNodejs a-practical-introduction-oredev
Nodejs a-practical-introduction-oredevFelix Geisendörfer
 
Nodejs - Should Ruby Developers Care?
Nodejs - Should Ruby Developers Care?Nodejs - Should Ruby Developers Care?
Nodejs - Should Ruby Developers Care?Felix Geisendörfer
 
Kubernetes for java developers - Tutorial at Oracle Code One 2018
Kubernetes for java developers - Tutorial at Oracle Code One 2018Kubernetes for java developers - Tutorial at Oracle Code One 2018
Kubernetes for java developers - Tutorial at Oracle Code One 2018Anthony Dahanne
 
OSCON 2011 - Node.js Tutorial
OSCON 2011 - Node.js TutorialOSCON 2011 - Node.js Tutorial
OSCON 2011 - Node.js TutorialTom Croucher
 
Persistent Memory Programming with Pmemkv
Persistent Memory Programming with PmemkvPersistent Memory Programming with Pmemkv
Persistent Memory Programming with PmemkvIntel® Software
 
Live streaming of video and subtitles with MPEG-DASH
Live streaming of video and subtitles with MPEG-DASHLive streaming of video and subtitles with MPEG-DASH
Live streaming of video and subtitles with MPEG-DASHCyril Concolato
 
Network Stack in Userspace (NUSE)
Network Stack in Userspace (NUSE)Network Stack in Userspace (NUSE)
Network Stack in Userspace (NUSE)Hajime Tazaki
 
Modelling IMS QTI with Topic Maps
Modelling IMS QTI with Topic MapsModelling IMS QTI with Topic Maps
Modelling IMS QTI with Topic Mapstmra
 
Run-time of Node.js : V8 JavaScript Engine
Run-time of Node.js: V8 JavaScript EngineRun-time of Node.js: V8 JavaScript Engine
Run-time of Node.js : V8 JavaScript EngineGary Yeh
 
Станислав Сидоренко «DeviceHive Java Server – миграция на Spring Boot»
Станислав Сидоренко «DeviceHive Java Server – миграция на Spring Boot»Станислав Сидоренко «DeviceHive Java Server – миграция на Spring Boot»
Станислав Сидоренко «DeviceHive Java Server – миграция на Spring Boot»DataArt
 
Developing realtime apps with Drupal and NodeJS
Developing realtime apps with Drupal and NodeJS Developing realtime apps with Drupal and NodeJS
Developing realtime apps with Drupal and NodeJS drupalcampest
 
Новый InterSystems: open-source, митапы, хакатоны
Новый InterSystems: open-source, митапы, хакатоныНовый InterSystems: open-source, митапы, хакатоны
Новый InterSystems: open-source, митапы, хакатоныTimur Safin
 

Similar a JavaScript Topic Maps in server environments (20)

Using Smalltalk for controlling robotics systems
Using Smalltalk for controlling robotics systemsUsing Smalltalk for controlling robotics systems
Using Smalltalk for controlling robotics systems
 
introduction to node.js
introduction to node.jsintroduction to node.js
introduction to node.js
 
Deploying WO on Windows
Deploying WO on WindowsDeploying WO on Windows
Deploying WO on Windows
 
Surge2012
Surge2012Surge2012
Surge2012
 
Nodejs a-practical-introduction-oredev
Nodejs a-practical-introduction-oredevNodejs a-practical-introduction-oredev
Nodejs a-practical-introduction-oredev
 
Nodejs - Should Ruby Developers Care?
Nodejs - Should Ruby Developers Care?Nodejs - Should Ruby Developers Care?
Nodejs - Should Ruby Developers Care?
 
Kubernetes for java developers - Tutorial at Oracle Code One 2018
Kubernetes for java developers - Tutorial at Oracle Code One 2018Kubernetes for java developers - Tutorial at Oracle Code One 2018
Kubernetes for java developers - Tutorial at Oracle Code One 2018
 
OSCON 2011 - Node.js Tutorial
OSCON 2011 - Node.js TutorialOSCON 2011 - Node.js Tutorial
OSCON 2011 - Node.js Tutorial
 
Node.js for beginner
Node.js for beginnerNode.js for beginner
Node.js for beginner
 
Persistent Memory Programming with Pmemkv
Persistent Memory Programming with PmemkvPersistent Memory Programming with Pmemkv
Persistent Memory Programming with Pmemkv
 
Nodejs - A quick tour (v6)
Nodejs - A quick tour (v6)Nodejs - A quick tour (v6)
Nodejs - A quick tour (v6)
 
Live streaming of video and subtitles with MPEG-DASH
Live streaming of video and subtitles with MPEG-DASHLive streaming of video and subtitles with MPEG-DASH
Live streaming of video and subtitles with MPEG-DASH
 
Network Stack in Userspace (NUSE)
Network Stack in Userspace (NUSE)Network Stack in Userspace (NUSE)
Network Stack in Userspace (NUSE)
 
Beginners Node.js
Beginners Node.jsBeginners Node.js
Beginners Node.js
 
Modelling IMS QTI with Topic Maps
Modelling IMS QTI with Topic MapsModelling IMS QTI with Topic Maps
Modelling IMS QTI with Topic Maps
 
Run-time of Node.js : V8 JavaScript Engine
Run-time of Node.js: V8 JavaScript EngineRun-time of Node.js: V8 JavaScript Engine
Run-time of Node.js : V8 JavaScript Engine
 
Станислав Сидоренко «DeviceHive Java Server – миграция на Spring Boot»
Станислав Сидоренко «DeviceHive Java Server – миграция на Spring Boot»Станислав Сидоренко «DeviceHive Java Server – миграция на Spring Boot»
Станислав Сидоренко «DeviceHive Java Server – миграция на Spring Boot»
 
Developing realtime apps with Drupal and NodeJS
Developing realtime apps with Drupal and NodeJS Developing realtime apps with Drupal and NodeJS
Developing realtime apps with Drupal and NodeJS
 
Новый InterSystems: open-source, митапы, хакатоны
Новый InterSystems: open-source, митапы, хакатоныНовый InterSystems: open-source, митапы, хакатоны
Новый InterSystems: open-source, митапы, хакатоны
 
Nodejs
NodejsNodejs
Nodejs
 

Último

APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 

Último (20)

APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 

JavaScript Topic Maps in server environments

  • 1. W E B V E V E R I E T JavaScript Topic Maps in server environments Jan Schreiber <jans@ravn.no> Ravn Webveveriet AS, 2010-10-01 1
  • 2. Outline • JavaScript • The tmjs Topic Maps engine • Use Case: A PSI Server • Outlook W E B V E V E R I E T 2
  • 3. JavaScript • JavaScript is LISP with a C-like syntax • Virtually every personal computer in the world has at least one JavaScript interpreter installed on it and in active use. W E B V E V E R I E T 3
  • 4. tmjs • A Topic Maps engine • Written in pure JavaScript • Full TMDM including Variants • TMAPI 2.0-based • In-memory backend, JTM import/ export, experimental XTM 2.0 import (requires DOM) W E B V E V E R I E T 4
  • 5. tmjs • Platform independent: All(iPhone & browsers, mobile devices modern Android), server-side JavaScript • Unit tests, CXTM tests (partly) & JSLint validating • Small changes to TMAPI due to the lack of method overloading • Syntactic sugar: Supports chaining of TMAPI calls W E B V E V E R I E T 5
  • 6. Chaining 1 tm.createTopic().addSubjectIdentifier(foo). 2 createName('bar').getParent(). 3 createOccurrence(type,'baz'). 4 addScopingTopic(quux); W E B V E V E R I E T 6
  • 7. tmjs: Outlook • More import/export formats: XTM 2.0, CTM • Complete TMAPI, add more tests, full CXTM • Persistence: • Web SQL Database backend • Persistent backend for Node (couchdb?) • Later: Query language W E B V E V E R I E T 7
  • 8. Use Case: A PSI Server • Idea: Start the server with a Topic Map and it will serve information about all Subject Identifiers for a given domain W E B V E V E R I E T 8
  • 9. • Screenshot node-psi-server W E B V E V E R I E T 9
  • 10. Server-side JavaScript • 1996: Netscape releases LiveWire as part of Netscape Enterprise Server 2.0 • 2009: Ryan Dahl writes Node W E B V E V E R I E T 10
  • 11. Node • A framework for low-level network applications based on Google's V8 engine • TCP, DNS and HTTP are first-class protocols • Event-based, asynchronous programming • All I/O is non-blocking W E B V E V E R I E T 11
  • 12. result = db_query(db, "SELECT * FROM topic"); W E B V E V E R I E T 12
  • 13. db_query(db, "SELECT * FROM topic", callback); W E B V E V E R I E T 13
  • 14. db_query(db, "SELECT * FROM topic", callback); callback = function (err, result) { // ... } W E B V E V E R I E T 14
  • 15. 1 var tm, servername; 2 // assumes that the TopicMap object tm has been initialized and 3 // the topic map in question has been imported successfuly. 4 // servername is set from a command line parameter 5 http.createServer(function (req, res) { 6 var url = 'http://'+servername+req.url, loc, topic; 7 loc = tm.createLocator(url); 8 topic = tm.getTopicBySubjectIdentifier(loc); 9 if (topic) { 10 res.writeHead(200, {'Content-Type': 'text/html'}); 11 // create a page with information about the PSI 12 } else { 13 // Not found: create a 404 response 14 } 15 res.close(); 16 }).listen(80); W E B V E V E R I E T 15
  • 16. Use Case: A PSI Server • More output formats: XHTML, JTM, XTM • Support for logging, caching, templates • Configurable list of information elements that are included on generated pages (e.g. dc:description, supertype-subtype) • PSI black-listing • subj3ct.com integration W E B V E V E R I E T 16
  • 17. PSI Server: Observations • Easy to implement • It’s really fast: 200+200ms to read the Opera topic map, 1ms to serve a PSI page • tmjs can be used on server and client side Reuse of application code W E B V E V E R I E T 17
  • 18. Summary & Outlook • Server side Topic Maps with JavaScript: possible! • Asynchronous TMAPI? • In its current state maybe best suited for low-level applications W E B V E V E R I E T 18
  • 19. What could it be good for? • TMRAP, TM REST API • SDshare • P2P applications • DNS servers W E B V E V E R I E T 19
  • 20. Questions? Download tmjs now! http://github.com/jansc/tmjs Coming soon: http://github.com/jansc/node-psi-server W E B V E V E R I E T 20