These are chat archives for biojs/biojs

Jun 2018
Megh Thakkar
Jun 08 2018 00:02
I have made an API endpoint which returns the relevant data(name of component, keywords etc) required for a search in about 600-700 ms on an average. It can be requested as soon as the window loads and stored. The reason I am inclined towards searching using Vue is that, if the client wishes to search for, say, cytoscape, the results can be rendered as soon as he starts with 'c', 'cy' and so on. Querying the database would require something concrete to be sent(such as 'cytoscape'). Hence, it might hamper the user experience.
I have also added tests for the database models as well as the API response for the landing page. You can view the updates biojs/biojs-backend#20. Thanks :smile:
Jun 08 2018 06:26
you can do 2 or 3 letter autocompletes if you want
stemformatics uses 4 letter autocompletes
type in stat
Dennis Schwartz
Jun 08 2018 09:55
Good work guys! The API looks nice.
@yochannah The reason the workmen response is so slow, is that there is no streaming of results. Instead of returning info to the front-end right away, the workman collects all the components in memory and then sends one JSON object when it’s all done. I made a prototype implementation where that is changed to a stream and the components get displayed right away. Hope we can use something similar in the new platform.
Yo Yehudi
Jun 08 2018 09:56
that makes sense
judicious use of localstorage could help render time, too - store the components in the session, and every subsequent load render from localstorage straight away and only update if / when the new response comes back. Only good for subsequent visits, though, and not the first.
Dennis Schwartz
Jun 08 2018 09:59
Totally. The data is not too big overall at this point.
Megh Thakkar
Jun 08 2018 15:23
@yochannah I was planning to store the data in the server cache as well! So we can meet somewhere in the middle where data is stored in the local storage as well as the server cache. I was thinking of using redis as compared to memcache, but have primitive knowledge. Can anyone who has used them before suggest which is better?
Yo Yehudi
Jun 08 2018 15:31
I've briefly used redis via clojure and found it straightforward to work with. It was a while ago now, and I can't comment on performance.
Sarthak Sehgal
Jun 08 2018 19:07
Hello @all
I've made the individual component page.
Not merging the branch yet as I've requested Megh to add a few fields like "created on", "no. of issues", etc.
Screenshots attached!
biojs blog week 4 (4).png
biojs blog week 4 (3).png
biojs blog week 4 (2).png
biojs blog week 4.png
Jun 08 2018 19:22
It's looking good!
I've used Redis extensively for Stemformatics.
It's both good and bad
good because it's easy, key-value pairs that you put into RAM
and it's fast
bad because you need to manage your cache
You also have to think about not being a download hog and have large numbers of data being stored on the client's browser. That can be pretty annoying when someone is browsing on a poor 3G mobile connection....