使用 Erlang、Mnesia 和 Yaws 设计元搜索引擎时首先要考虑什么?

发布于 2024-10-19 10:22:26 字数 102 浏览 10 评论 0原文

有人可以向我解释一下,在使用 Erlang、Mnesia 和 Yaws Web 服务器设计元搜索引擎时首先要考虑什么吗?该引擎应该具有 SMS 功能,但我仍然想知道如何合并此功能......

Can someone explain to me what to consider first when designing a meta-search engine using Erlang, Mnesia and the Yaws web server? This engine should have SMS capability but I am still wondering how I am going to incorporate this feature...

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

黒涩兲箜 2024-10-26 10:22:26

元搜索引擎,您需要来自 Google、Yahoo 和 Bing 的 REST 或 Ajax API。下面为您提供了一些示例,您可以在后端支持 HTTP 的库或前端 JavaScript 中使用这些示例。我个人使用 mochiwebyaws Appmods
例如:Google 有一个 Ajax 搜索 API,其工作方式如下

http://ajax.googleapis.com/ajax/services/search/web?v=1.0&q=computers

:该 URL 将为您提供一个 JSON 对象,其中包含多个搜索响应。在本例中,搜索词是“计算机”

雅虎拥有所谓的 Boss API。使用 Boss 的 Yahoo Rest 搜索 API 的示例如下:

For an XML result: 

http://boss.yahooapis.com/ysearch/web/v1/animals?appid=APPID&format=xml&start=1&count=3

For a Json result:

http://boss.yahooapis.com/ysearch/web/v1/animals?appid=APPID&format=json&start=1&count=3

很好地分析整个 HTTP GET 查询,您会注意到他们称之为 APPID 的东西。当您在此处注册时,您将获得此信息。我无法向您提供我的 APPID,您必须获取您的 APPID,然后将其粘贴到那里,然后您就可以开始了。雅虎有更强大的东西,称为
YQL。在上面的查询中,搜索词是:“animals”

Bing 也有一个 API 适合您,但您需要一个 APPID:

http://api.bing.net/json.aspx?AppId=APPID&Query=love&Sources=Web&Version=2.0&Market=en-us&Web.Count=10

上面,搜索词是: “爱”

About the Meta Search Engine

You have a web page, people enter search queries in this page. You use your javaScript (JSONP). JSONP could be implemented in any one of your favorite JavaScript Framework you use e.g.
JQUERY,Ext JS,Dojo, Prototype e.t.c
Then you would have to parse the XML or JSON response from the three sources (Google, Yahoo and Bing),and make an appropriate display for your users to navigate the results.

About the SMS part


SMS capability is attained using SMS Gateway. There are several open and close source SMS Gateways. the most powerful of them all is the one built in Erlang/OTP technology called: OSERL, but to test it, you need direct connection with an SMSC in anyone of your local service provider.You need a Port on their SMSC, a user name and a password.There is another one which is better for development reasons called: NowSMS because it has capabilities for USSD, Modem Internet Communication, SMSC service connectivity, HTTP 1.1 and HTTP 1.0, configuration of two-way SMS messaging e.t.c from a Web App to-and -from the SMS Gateway. Go to their site, grab the trial version, follow the documentation and then configure two-way from your web app to the gateway and vice versa. Since NowSMS is not free, you can try: Kannel, it is open source but you will need help from the community to set it up on your Unix or Linux box.
More on incorporating SMS capability in Web Applications can be found:
Here

The meta search engine, you need REST or Ajax APIs from Google, Yahoo and Bing. Below am providing you with examples which you may use within your back end HTTP capable Library or your front end JavaScript. I personally use mochiweb and yaws Appmods.
For example: Google has an Ajax search API which works like this:

http://ajax.googleapis.com/ajax/services/search/web?v=1.0&q=computers

Hitting that URL will give you a JSON Object which contains several search responses. In this case, the search term is "computers"

Yahoo has what it calls Boss APIs. An example of Yahoo Rest search API using Boss is here below:

For an XML result: 

http://boss.yahooapis.com/ysearch/web/v1/animals?appid=APPID&format=xml&start=1&count=3

For a Json result:

http://boss.yahooapis.com/ysearch/web/v1/animals?appid=APPID&format=json&start=1&count=3

Analyse the whole HTTP GET query very well, you notice something they call an APPID. This you will get when you register with them here. I cannot give to you my APPID, you will have to get yours,then paste it in there and you will be good to go. Yahoo has something more powerful called
YQL. In the above query, the search term is: "animals"

Bing as well has got an API for you, but you will need an APPID:

http://api.bing.net/json.aspx?AppId=APPID&Query=love&Sources=Web&Version=2.0&Market=en-us&Web.Count=10

Above, the search term is: "love"

About the Meta Search Engine


You have a web page, people enter search queries in this page. You use your javaScript (JSONP). JSONP could be implemented in any one of your favorite JavaScript Framework you use e.g.
JQUERY,Ext JS,Dojo, Prototype e.t.c
Then you would have to parse the XML or JSON response from the three sources (Google, Yahoo and Bing),and make an appropriate display for your users to navigate the results.

About the SMS part


SMS capability is attained using SMS Gateway. There are several open and close source SMS Gateways. the most powerful of them all is the one built in Erlang/OTP technology called: OSERL, but to test it, you need direct connection with an SMSC in anyone of your local service provider.You need a Port on their SMSC, a user name and a password.There is another one which is better for development reasons called: NowSMS because it has capabilities for USSD, Modem Internet Communication, SMSC service connectivity, HTTP 1.1 and HTTP 1.0, configuration of two-way SMS messaging e.t.c from a Web App to-and -from the SMS Gateway. Go to their site, grab the trial version, follow the documentation and then configure two-way from your web app to the gateway and vice versa. Since NowSMS is not free, you can try: Kannel, it is open source but you will need help from the community to set it up on your Unix or Linux box.
More on incorporating SMS capability in Web Applications can be found:
Here

喵星人汪星人 2024-10-26 10:22:26

我还曾经问过一个与使用 Erlang、Mnesia 和 开发强大的搜索引擎相关的问题。 Stackoverflow 上的 YAWS 网络服务器。我得到了很多好的答案和回应。

点击我!

希望这会有所帮助。因为我不确定短信的事情。

I also asked once a Question related to development of a powerful search engine using Erlang, Mnesia & YAWS webserver on Stackoverflow. I got plenty of good answers and responses.

Please CLICK ME!

Hope this may help. As I am not sure about SMS thing.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文